import { Column, Entity, Index, PrimaryGeneratedColumn } from "typeorm";

@Index("locale_code_key", ["code"], { unique: true })
@Index("locale_pkey", ["id"], { unique: true })
@Index("locale_name_key", ["name"], { unique: true })
@Entity("locale", { schema: "public" })
export class Locale {
  @PrimaryGeneratedColumn({ type: "smallint", name: "id" })
  id: number;

  @Column("character varying", {
    name: "name",
    unique: true,
    length: 10,
    default: () => "''",
  })
  name: string;

  @Column("character varying", {
    name: "code",
    unique: true,
    length: 10,
    default: () => "''",
  })
  code: string;

  @Column("boolean", { name: "enable", default: () => "false" })
  enable: boolean;

  @Column("smallint", { name: "sort", default: () => "0" })
  sort: number;

  @Column("integer", { name: "create_time", default: () => "0" })
  createTime: number;

  @Column("integer", { name: "update_time", default: () => "0" })
  updateTime: number;
}
